﻿<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" autoFlush="true"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/qautil.tld" prefix="qautil"%>
<jsp:include page="viewuserinfobyother.jsp"/>
<br>
<table align="center" width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td>   
            <span class="title">
                <html:link page="/user.mrqa?action=viewuserbyother" paramId="id" paramName="usero" paramProperty="id">
                个人帖子
                </html:link>
            </span>
            <span class="title1">
                <html:link page="/user.mrqa?action=viewanswersbyother" paramId="id" paramName="usero" paramProperty="id">
                    个人回复
                </html:link>
            </span>
            <span class="title">
                <html:link page="/user.mrqa?action=viewsharedfilesbyother" paramId="id" paramName="usero" paramProperty="id">
                共享资料
                </html:link>
            </span>
            <span class="title">
            	<html:link page="/user.mrqa?action=viewspendbyother" paramId="id" paramName="usero" paramProperty="id">积分兑换</html:link>
            </span>
            <span class="title">
            	<html:link page="/user.mrqa?action=viewawardbyother" paramId="id" paramName="usero" paramProperty="id">积分奖励</html:link>
            </span>
        </td>
        <td align="right">回复总数:<b><c:out value="${resultSize}"/></b>&nbsp;&nbsp;</td>
    </tr>
</table>    
<table align="center" class="qlist" width="100%" cellpadding="0" cellspacing="0">
  <thead>
    <tr>
        <th>所属帖子</th>
        <th>回复摘要</th>
        <th>日期</th>        
    </tr>
  </thead>
  <tbody>
    <c:forEach var="answer" items="${myanswers}" varStatus="index">
    <c:if test="${answer.mrIaskQuestion.mrIaskCategory.onlyForAdmin == 'N'}">
        <c:if test="${(index.count)%2 == 0}">
      <tr class="even">    
        </c:if>
        <c:if test="${(index.count)%2 != 0}">
      <tr class="odd">    
        </c:if>
        <td>
            <c:set var="questionid" value="${answer.mrIaskQuestion.id}"/>
            	<c:if test="${answer.mrIaskQuestion.mrIaskCategory.type == 0}">
            		<html:link page="/question.mrqa?action=view" paramId="id" paramName="questionid">
            		<c:if test="${answer.mrIaskQuestion.titleAttribute != null}">
            			<span style="<c:out value="${answer.mrIaskQuestion.titleAttribute}" />">
            		</c:if>
            		<c:out value="${answer.mrIaskQuestion.title}" escapeXml="false"/>
            		<c:if test="${answer.mrIaskQuestion.titleAttribute != null}">
            			</span>
            		</c:if>
            		</html:link>
            	</c:if>
            	<c:if test="${answer.mrIaskQuestion.mrIaskCategory.type == 1}">
            		<html:link page="/life.mrqa?action=view" paramId="id" paramName="questionid">
            		<c:if test="${answer.mrIaskQuestion.titleAttribute != null}">
            			<span style="<c:out value="${answer.mrIaskQuestion.titleAttribute}" />">
            		</c:if>
            		<c:out value="${answer.mrIaskQuestion.title}" escapeXml="false"/>
            		<c:if test="${answer.mrIaskQuestion.titleAttribute != null}">
            			</span>
            		</c:if>
            		</html:link>
            	</c:if>
            	<c:if test="${answer.mrIaskQuestion.mrIaskCategory.type == 2}">
            		<html:link page="/tech.mrqa?action=view" paramId="id" paramName="questionid">
            		<c:if test="${answer.mrIaskQuestion.titleAttribute != null}">
            			<span style="<c:out value="${answer.mrIaskQuestion.titleAttribute}" />">
            		</c:if>
            		<c:out value="${answer.mrIaskQuestion.title}" escapeXml="false"/>
            		<c:if test="${answer.mrIaskQuestion.titleAttribute != null}">
            			</span>
            		</c:if>
            		</html:link>
            	</c:if>
        </td>
        <td>
            <span title="<c:out value="${answer.content}"/>"><c:out value="${fn:substring(answer.content,0,20)}"/>.....</span>
        </td>
        <td>
            <fmt:formatDate value="${answer.postDate}" var="postDatexx" type="both" pattern="yyyy-MM-dd HH:mm:ss"/><c:out value="${postDatexx}"/>        
        </td>
    </tr>
    </c:if>
    </c:forEach>
  </tbody>  
</table>    
<qautil:page action="/user.mrqa"/>